import { Button, Popconfirm, Space, Table } from 'antd';
import styles from './index.module.scss';
export default function RoleManager() {
  return (
    <div className={styles.root}>
      <Table
        dataSource={[]}
        pagination={{}}
        columns={[
          {
            title: '序号',
            dataIndex: 'index',
            render: (item, rowData, index) => index,
          },
          {
            title: '角色',
            dataIndex: 'name',
          },
          { title: '描述', dataIndex: 'description' },

          {
            title: '操作',
            dataIndex: 'action',
            render(text, rowData) {
              return (
                <Space>
                  <Popconfirm
                    title='确认删除吗'
                    onConfirm={() => {
                      console.log('rowData  ----->  ', rowData);
                    }}
                  >
                    <Button type='primary' danger>
                      删除
                    </Button>
                  </Popconfirm>
                </Space>
              );
            },
          },
        ]}
        rowKey='id'
        bordered
        size='small'
      />
    </div>
  );
}
